observations
Class Measurement

java.lang.Object
  extended byobservations.DomainObject
      extended byobservations.Observation
          extended byobservations.Measurement
All Implemented Interfaces:
DomainInterface

public class Measurement
extends Observation

Measurement Represents something like 'bloodpressure 120 mm/Hg'. Measurement is part of Fowler's pattern 'Measurement'. It represents the individual measurement. It is linked to the object being measured (the patient) and to a phenomenon type that describes the kind of measurement being made. It's also part of the pattern 'Observation'.

Version:
1.0 2004-08-10
Author:
Sascha Hemminger
See Also:
PhenomenonType, Patient, Observation

Constructor Summary
Measurement(Quantity amount, PhenomenonType phenomenonType, Patient patient, java.util.Date whenObserved)
          Constructs a Measurement object.
 
Method Summary
 Quantity amount()
          Gives the measured amount.
 Phenomenon calculatePhenomenonFor(Quantity arg)
          Gives a valuation in quality for a given amount.
 Phenomenon getPhenomenon()
          Gives the phenomenon for this measurement.
 
Methods inherited from class observations.Observation
getPhenomenonType, isPresent, whenObserved
 
Methods inherited from class observations.DomainObject
getName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Measurement

public Measurement(Quantity amount,
                   PhenomenonType phenomenonType,
                   Patient patient,
                   java.util.Date whenObserved)
            throws OutOfRangeException
Constructs a Measurement object.

Parameters:
amount - measured quantity
phenomenonType - type of the measurement
patient - measured patient
whenObserved - when did you observe the measurement
Throws:
OutOfRangeException - if the amount is not valid
Method Detail

amount

public Quantity amount()
Gives the measured amount.

Returns:
amount of Measurement

calculatePhenomenonFor

public Phenomenon calculatePhenomenonFor(Quantity arg)
Gives a valuation in quality for a given amount.

Parameters:
arg - amount to calculate Phenomenon for
Returns:
Phenomenon for particular amount

getPhenomenon

public Phenomenon getPhenomenon()
Gives the phenomenon for this measurement.

Overrides:
getPhenomenon in class Observation
Returns:
the particular phenomenon